const Base = require('./index')

const table = 'config'

class Config extends Base {
    constructor(){
        super(table)
    }
    
    async get() {
        const rows = await this.knex.select().from(this.table).where('tag', 'system')
        return rows && rows.length > 0 ? rows[0] : {}
    }
}

module.exports = new Config()